<template>
    <div id="swagger" style="height: 100%; width: 100%; position: absolute">
        <div class="div_head">
            <el-link href="/" type="primary" style="padding-top: 0.5%"><<< 首页</el-link>
        </div>
        <iframe id='linkedFrame'
                style="width: 100%; height: 94%"
                :src="swaggerSrc"
                frameborder='0'
                scrolling='auto'></iframe>
    </div>
</template>

<script>
    export default {
        name: "Swagger",
        data(){
            return {
                swaggerSrc: null
            }
        },
        methods: {
            getHtml(){
                this.swaggerSrc = this.$baseUrl + 'swagger-ui/index.html#/'
            }
        },
        created() {
            this.getHtml();
        }
    }
</script>

<style scoped>
    .div_head{
        height: 5%;
        width: 100%;
        background-color: #1B1B1B;
    }
</style>
